import Vue from 'vue'
import VueI18n from 'vue-i18n'
import elementZh from 'element-ui/lib/locale/lang/zh-CN'
import elementEn from 'element-ui/lib/locale/lang/en'
import zh from './zh'
import en from './en'
import CookieJs from 'js-cookie'
Vue.use(VueI18n)
const i18n = new VueI18n({
  locale: CookieJs.get('lang') || 'en',
  messages: {
    en: {
      xxx: 'Working calendar',
      aaa: 'Refresh',
      ...elementEn,
      ...en
    },
    zh: {
      xxx: '工作日历',
      aaa: '刷新',
      ...elementZh,
      ...zh
    }
  }
})

export default i18n
